export interface TodoList {
  id: number
  name: string
  userId: number
  createdAt: Date
  updatedAt: Date
}

export interface Todo {
  id: number
  listId: number
  title: string
  completed: boolean
  dueDate?: Date
  priority: number
  createdAt: Date
  list?: {
    id: number
    name: string
  }
}

export interface CreateTodoListRequest {
  name: string
}

export interface UpdateTodoListRequest {
  name?: string
}

export interface CreateTodoRequest {
  title: string
  listId: number
  dueDate?: Date
  priority?: number
}

export interface UpdateTodoRequest {
  title?: string
  listId?: number
  completed?: boolean
  dueDate?: Date
  priority?: number
}

export type TodoPriority = 0 | 1 | 2 | 3 // 0: 无, 1: 低, 2: 中, 3: 高

export interface TodosResponse {
  data: Todo[]
  pagination: {
    page: number
    limit: number
    total: number
  }
}